# SConscript for build timings

import config

#SourceSignatures('timestamp')
toucher = Builder(action = 'touch $TARGET')
env = Environment(BUILDERS = {'Touch' : toucher})

num_levels = config.NUM_LEVELS
num_sources = config.NUM_SOURCES


def maketoken(level, source):
    return "%d_%04d" % (level, source)

def subfromtoken(token):
    return token[0:1] + "/" + token[2:4]

for level in range(num_levels):
    print ".. level %d/%d" % (level, num_levels)
    for source in range(num_sources):
        token = maketoken(level, source)
        source = "data/source_dir/%s/source_file_%s.c" % (subfromtoken(token), token)
        target = "data/target_dir/%s/source_file_%s.o" % (subfromtoken(token), token)
        env.Touch(target, source, CPPPATH='.')
#        Object(target, source, CPPPATH='.')
#        Object('data/target_dir/0/00/source_file_0_0000.o', 'data/source_dir/0/00/source_file_0_0000.c', CPPPATH='.')

    
